Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update text in search field when clicking on suggestion #3482

Merged

Conversation

guemax
Copy link
Contributor

@guemax guemax commented Mar 18, 2024

Currently, the text in the search field only updates itself when you select a suggestion via the up/down arrow keys, but not when clicking on a suggestion with the left mouse button. However, the h1 element below the input field changes in both cases. I personally find this quite irritating.

It seems like this is unintended behavior: There is a function named onClick(i) which does exactly the thing I would like to have, but apparently it is never called anywhere.

Thanks in advance for your answer!

@Bnyro
Copy link
Member

Bnyro commented Mar 19, 2024

Thanks for your PR, what you said above absolutely makes sense 👍

I think that the onClick method is not needed at all because we could just call the setSelected method directly instead, so I'd prefer just doing so as proposed above.

@Bnyro Bnyro changed the title Update text in search field when clicking on suggestion fix: update text in search field when clicking on suggestion Mar 19, 2024
@guemax guemax force-pushed the update-search-text-when-clicking-on-suggestion branch from 514c5b5 to b9c9025 Compare March 20, 2024 15:57
@Bnyro Bnyro merged commit 693ac36 into TeamPiped:master Mar 20, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants